﻿<Window x:Class="Neurokinetic.Electroencephalograph.View.ConnectionsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:nsnm="clr-namespace:Neurokinetic.NeuroSkyNet.Model;assembly=NeuroSkyNet"
    xmlns:nsnc="clr-namespace:Neurokinetic.NeuroSkyNet.Controller;assembly=NeuroSkyNet"
    xmlns:vm="clr-namespace:Neurokinetic.Electroencephalograph.ViewModel"
    xmlns:s="clr-namespace:System;assembly=mscorlib"
    Title="Connections" Height="300" Width="300" Loaded="Window_Loaded"
        Name="wdwConnections"
        Background="Black"
        Foreground="White"
    >
    <Window.Resources>
        <vm:MindSetsViewModel x:Key="MindSetsViewModel" />
        <DataTemplate x:Key="MindSetTemplate" DataType="Neurokinetic.NeuroSkyNet.Model.MindSetModel">
            <TextBlock>
                Battery:
                <TextBlock Text="{Binding Path=Battery}"/>
                Signal:
                <TextBlock Text="{Binding Path=Signal}" />
           </TextBlock>
        </DataTemplate>
    </Window.Resources>
    <StackPanel>
        <StackPanel DataContext="{Binding Source={StaticResource MindSetsViewModel}}">
            <TextBlock FontSize="60" Foreground="Gray"  Text="{Binding Information}" ></TextBlock>
            <TextBlock Text="{Binding MindSets.Count}" ></TextBlock>
            <StackPanel.Effect>
                <BlurEffect Radius="16" RenderingBias="Quality" ></BlurEffect>
            </StackPanel.Effect>
        </StackPanel>
        <TextBlock DataContext="{Binding Source={x:Static s:DateTime.Now}}">
            <TextBlock Text="{Binding Month}" />
            /<TextBlock Text="{Binding Day}" />
            /<TextBlock Text="{Binding Year}" />
            <TextBlock.BitmapEffect>
                <OuterGlowBitmapEffect GlowColor="Red" GlowSize="5"></OuterGlowBitmapEffect>
            </TextBlock.BitmapEffect>
        </TextBlock>
        <StackPanel>
            <ItemsControl ItemsSource="{Binding Source={StaticResource MindSetsViewModel},Path=MindSets}" 
                          ItemTemplate="{StaticResource MindSetTemplate}"></ItemsControl>
        </StackPanel>
    </StackPanel>
</Window>
